package notification.interactionbd;
import java.sql.Timestamp;
import java.util.Date;

public class Event {
	private String number;
	private int devid;
	private Timestamp eventtime;
	private int pckid;
	private short code;
	private short subcode;
	private String msg;
	
	public void setnumber(String val){
		number=val;
	}

	public String getnumber(){
		return number;
	}
	
 	public int getdevid (){
		return devid;
	}
	
	public void setdevid (int value){
		devid=value;
	}
	
	public Timestamp geteventtime(){
		return eventtime;
	}
	
	public void seteventtime (Timestamp value){
		eventtime=value;
	}
	
	public void setTime(Date b){
		eventtime=Timestamp.valueOf(1900+b.getYear()+"-"+(b.getMonth()+1)+"-"+b.getDate()+" "+b.getHours()+":"+
		b.getMinutes()+":"+b.getSeconds());
	}
	
	public int getpckid(){
		return pckid;
	}
	
	public void setpckid (int value){
		pckid=value;
	}
	
	public short getcode(){
		return code;
	}
	
	public void setcode (short value){
		code=value;
	}
	
	public short getsubcode(){
		return subcode;
	}
	
	public void setsubcode (short value){
		subcode=value;
	}
	
	public String getmsg(){
		return msg;
	}
	
	public void setmsg(String value){
		msg=value;
	}
	
	
	public String toString(){
	  return "Device=="+devid+"\nEvent time=="+eventtime+"\nKey of package=="+pckid+
			  "\nCode event=="+code+"\nSubcode event=="+subcode+"\nMessage=="+msg+"\n";
	}
	
	public static void main(String[] args) {
		System.out.println("Hello world");
		// TODO Auto-generated method stub
	}

}
